-
Notifications
You must be signed in to change notification settings - Fork 195
Sensormond stop signal logic - incorrect short circuit #662
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sensormond stop signal logic - incorrect short circuit #662
Conversation
the or short circuits the evaluation if voltage updater returns True... I guess it should've been: ``` if not (self.voltage_updater.update(self.stop_event) and self.current_updater.update(self.stop_event)): ``` We do want them to be chained such that if either returns False it will short circuit and not run the 2nd one (no point in running current updater if voltage receives a stop signal).
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
@prgeor @judyjoseph please help to review this, currently sensormond for current sensors is not working as expected without this |
|
@gregoryboudreau : please make sure sonic-mgmt test case would have caught this issue. |
|
@judyjoseph please help with sign-off |
|
@abdosi @judyjoseph is anything else needed? |
Really need this merged before 202511 is created. |
judyjoseph
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
the or short circuits the evaluation if voltage updater returns True, this was raised as an issue on a comment on original PR, #600: #600 (comment)
We do want them to be chained such that if either returns False it will short circuit and not run the 2nd one (no point in running current updater if voltage receives a stop signal).
Description
Will now short circuit logic if voltage updater returns false (hit a stop signal) and exits functionality as long as either returns false, not if both return false.
Motivation and Context
Testing of #600 involved running manual validations to ensure that sending stop signals during execution was handled in a more timely pace. Was a miss.
How Has This Been Tested?
Reran sensormond daemon, this time through supervisorctl, and can see it coming up w/ voltage and chassis tables correctly.
Above is dump of voltage and current on a system w/ this change present.
Additional Information (Optional)